﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>


<title></title>
</head>

<div class="ibox-content">
	<form class="form-horizontal" id="dataform"
		onsubmit="javascripr:return false;">

		<input type="hidden" name="tokenUrl" value="${tokenUrl}"> 
		<input type="hidden" name="token" value="${token}">
		<input type="hidden" id="projId" name="projId" value="${projId }">
		
		<c:if test="${obj ne null }">
			<input type="hidden" name="id" value="${obj.id }">
		</c:if>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">评审对象</label>
			<div class="col-sm-10">
				<select name="projUserId" class="form-control" dataType="*" nullmsg="评审对象不能为空">
					<option value="">--请选择评审对象--</option>
					<c:forEach items="${projUserlist }" var="item">
						<option value="${item.id }">${item.userName }</option>
					</c:forEach>
				</select>
				<div class="Validform_checktip"></div>
			</div>			
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">评审标题</label>
			<div class="col-sm-10">
				<input type="text" dataType="*1-40" class="form-control" 
					name="title" nullmsg="评审标题不能为空" errormsg="长度不能超过40">
			</div>
			<div class="Validform_checktip"></div>
		</div>
		
		<!-- <div class="form-group">
			<label class="col-sm-2 control-label">评审时间</label>
			<div class="col-sm-10">
				<input type="text" dataType="*" class="form-control datetimepicker"
					name="time" nullmsg="评审时间不能为空">				
			</div>
			<div class="Validform_checktip"></div>
		</div> -->
		
		<div class="form-group">
			<label class="col-sm-2 control-label">评审内容</label>
			<div class="col-sm-10">
				<textarea rows="5" cols="50" class="form-control" name="content"
					dataType="*1-500" nullmsg="评审内容不能为空" errormsg="长度不能超过500"></textarea>
				<div class="Validform_checktip"></div>
			</div>			
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">评审细则</label>
			<div class="col-sm-10">
				<table class="table table-bordered table-hover table-striped">
 					<tr>
 						<th class="center">问题</th>
 						<th class="center">是</th>
 						<th class="center">否</th>
 						<th class="center">备注</th>
 					</tr>
 					<c:forEach items="${ddtList }" var="item" varStatus="status">
 						<tr>					
							<td class="center">
								<input  type="hidden" class="form-control" name="reviewDetailList[${status.index}].what" value="${item.name }">	
								${item.name }						
							</td>
	 						<td class="center">
	 							<input type="radio"  value="是"
	 								name="reviewDetailList[${status.index}].answer" 
	 								datatype="*" errormsg="请选择" > 是	
	 							<div class="Validform_checktip"></div>					
							</td>
	 						<td class="center">
	 							<input type="radio"  value="否"
	 								name="reviewDetailList[${status.index}].answer" 
	 								> 否
	 						</td>
	 						<td class="center">
	 							<input type="text" class="form-control" 
	 								name="reviewDetailList[${status.index}].remark" >
	 						</td>   
 						</tr>
					</c:forEach>
				</table>
			</div>			
		</div>
		
		
		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:;" onclick="myForm.submit()"
					class="btn btn-success radius">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<button onclick="MTools.closeForm()" class="btn btn-danger radius"
					type="button">取消</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">

	$(".select2").select2();
	/* MTools.ininDatetimepicker({
		maxView : 3,
		minView : 2,
		listenBlur : true,
	}); */
	
	var myForm = MForm.initForm({
		invokeUrl : "${path}/admin/codeReview/addOrModify",
		afterSubmit : function() {
			parent.myGrid.serchData();
		},
	});
	

</script>
</body>
</html>